package com.chixing.fourteen.controller;

import com.chixing.fourteen.pojo.Customer;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * @author Y2014188432
 */
@Controller
public class JumpController {

    @GetMapping("/toHome")
    public String toHome(HttpServletRequest request, Model model){
        HttpSession session = request.getSession();
        model.addAttribute("customer",(Customer)session.getAttribute("customer"));
        return "homepage";
    }

    @GetMapping("/toGetCar")
    public String toGetCar(){
        return "getCar";
    }


}
